package name.luojun.DBhelper.ORM.entity;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class UniqueKey {
	private String name;
	private Set<Column> columns = new HashSet<Column>();
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public boolean hasColumn(Column column) {
		return columns.contains(column);
	}
	public Set<Column> getColumns() {
		return columns;
	}
	public void addColumn(Column column) {
		columns.add(column);
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((columns == null) ? 0 : columns.hashCode());
		result = prime * result + ((name == null) ? 0 : name.hashCode());
		return result;
	}
	
}
